<?php
namespace app\miniprogram\controller;

class UserAddress extends Base {
    protected $process = ['Info', 'tyyh\\UserAddress'];

    //获取性别选项
    public function sex() {
        $this->success('', loadEnum('Sex')->get_options());
    }

    //获取我的地址
    public function private_list() {
        $this->ajax_process(function($process, $user) {
            return $process->private_list($user);
        });
    }

    //保存地址
    public function save() {
        $this->ajax_process(function($process, $user) {
            return $process->save($user);
        });
    }

    //地址详情查询
    public function info() {
        $this->ajax_process(function($process, $user) {
            return $process->info($user);
        });
    }

    //删除地址
    public function del() {
        $this->ajax_process(function($process, $user) {
            return $process->delAll($user);
        });
    }

    //删除地址
    public function dels() {
        $this->ajax_process(function($process, $user) {
            return $process->delAll4Ids($user);
        });
    }
}
